home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / 316_01.zip / DIV.Z8 < prev    next >
Text File  |  1993-04-01  |  439b  |  26 lines

  1.     .hlist
  2. /
  3. /----   divide from page 25
  4. /
  5. COUNT           =       w0
  6. DIVISOR         =       w1
  7. DIVIDEND_HI     =       w2
  8. DIVIDEND_LO     =       w3
  9. /
  10.     mov     $8,COUNT
  11.     cmp     DIVIDEND_HI,DIVISOR
  12.     bugt    1f
  13.     scf
  14.     ret
  15. 1:      rlc     DIVIDEND_LO
  16.     rlc     DIVIDEND_HI
  17.     bcs     2f
  18.     cmp     DIVIDEND_HI,DIVISOR
  19.     bugt    3f
  20. 2:      sub     DIVISOR,DIVIDEND_HI
  21.     scf
  22. 3:      sob     COUNT,1b
  23.     rlc     DIVIDEND_LO
  24.     ret
  25.  
  26.